package com.sservice.model.dao;

import com.sservice.model.entity.Clientele;
import com.sservice.model.vo.ClienteleVo;

import java.util.List;
import java.util.Map;

public interface IClienteleDao {
    int deleteByPrimaryKey(Integer id);

    int insert(Clientele record);

    int insertSelective(Clientele record);

    Clientele selectByPrimaryKey(Integer id);

    /**
     * 通过com_name && unitCode 查找
     *
     * @param clientele
     * @return
     */
    Clientele selectByComNameAndUnitCode(Clientele clientele);

    int updateByPrimaryKeySelective(Clientele record);

    int updateByPrimaryKeyWithBLOBs(Clientele record);

    int updateByPrimaryKey(Clientele record);

    /***
     * 替换整个系统的数据
     * @param map
     */
    void replaceUnitCode(Map map);


    /**
     * 我的客户
     *
     * @param arg
     * @return
     */
    List<Clientele> queryMyClientele(ClienteleVo arg);

    int queryCount(ClienteleVo arg);

    List<Clientele> queryByPage(ClienteleVo arg);

    int countBy(ClienteleVo arg);

    List<Clientele> queryBy(ClienteleVo arg);


    /**
     * 供应商按条件统计
     *
     * @param arg
     * @return
     */
    int querySupplierCount(ClienteleVo arg);

    /**
     * 供应商按条件分页
     *
     * @param arg
     * @return
     */
    List<Clientele> querySupplierByPage(ClienteleVo arg);
}